package com.wtf.generator.config;

import com.wtf.generator.service.WtfDataSourceService;
import com.wtf.generator.service.WtfTemplateConfigService;
import com.wtf.generator.support.DbSqlRepositorySupport;
import com.wtf.generator.support.DbTableSqlSupport;
import com.wtf.generator.support.DsStoreSupport;
import com.wtf.generator.support.PrimaryDsDbStoreSupport;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * description: 数据源数据库配置类
 * date: 2022/6/18 10:59
 * @author linhuanyou
 * @email 496558736@qq.com
 * @version 1.0
 */
@Configuration
public class DsDbConfig {

    @Bean
    public DbTableSqlSupport dbTableSqlSupport(){
        return new DbSqlRepositorySupport();
    }

    @Bean
    public DsStoreSupport dsStoreSupport(WtfDataSourceService wtfDataSourceService, WtfTemplateConfigService wtfTemplateConfigService){
        return new PrimaryDsDbStoreSupport(wtfDataSourceService,wtfTemplateConfigService);
    }

}
